<script>
export default {
    onLaunch: function() {
        // 接口全局请求参数，消灭原来各页面的sessionkey请求参数
        global.sessionkey = uni.getStorageSync('sessionkey');
        global.openid = uni.getStorageSync('openid');
        // 角色，全局变量，对应原来各对应页面的type，1：阿姨;2：家政公司;3：业主
        global.role = uni.getStorageSync('role');
        // 资质，2:已认证；1：未认证；其它：未绑定
        global.identification = uni.getStorageSync('identification');
        
        global.district = uni.getStorageSync('district') || '江宁区';
        global.adcode = uni.getStorageSync('adcode') || '320115';

        console.log(`App Launch role=${global.role},sessionkey=${global.sessionkey},identification=${global.identification}`);
    },
    onShow: function() {
        console.log('App Show');
    },
    onHide: function() {
        console.log('App Hide');
    }
};
</script>

<style lang="scss">
/*每个页面公共css */
//@import url('./wxcomponents/vant/common/index.wxss');
view {
    font-size: 28rpx;
    box-sizing: border-box;
}
.tabbar {
    position: fixed;
    height: 100rpx;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    width: 100%;
    border-top: 1px solid #f1f1f1;
    background: #fff;
    z-index: 999;
    .item {
        flex: 1;
        font-size: 0.6rem;
        color: #666;
        text-align: center;
        .img {
            width: 40rpx;
            height: 40rpx;
        }
        text {
            display: block;
        }
    }
    .active {
        color: #ff6702;
    }
}
.tab-content {
    margin-bottom: 100rpx;
}
.li-section {
    padding-left: 34rpx;
    color: #666666;
    font-size: 24rpx;
    line-height: 96rpx; // 70rpx
    background-color: #f4f4f4;
}
.li-pref {
    position: relative;
    height: 96rpx;
    &:after {
        @include divider(30rpx);
    }
    &-last {
        &:after {
            border: none;
        }
    }
}

.btn-primary-invert {
    position: relative;
    image {
        width: 28rpx;
        height: 28rpx;
        margin-right: 20rpx;
    }
    &:after {
        @include border-1px($uni-color-primary, 12rpx);
    }
    color: $uni-color-primary;
    font-size: 32rpx;
}
.btn-primary {
    position: relative;
    image {
        width: 28rpx;
        height: 28rpx;
        margin-right: 20rpx;
    }
    background-color: $uni-color-primary;
    color: white;
    font-size: 32rpx;
    border-radius: 12rpx;
}
.text-link {
    color: $uni-color-primary;
}
.ptr-list {
    margin-top: 72rpx;
}
.ptr-list.ptrsearch {
    margin-top: 172rpx;
}
.nothing {
    text-align: center;
    image {
        width: 300rpx;
        height: 300rpx;
        margin-top: 300rpx;
    }
}
.empty {
    height: 100vh;
}
.recommend-nothing {
    text-align: center;
    image {
        width: 275rpx;
        height: 322rpx;
        margin-top: 60rpx;
    }
    text {
        font-size:24rpx;
        line-height:24rpx;
        color: #BCBCBC;
        margin-top: 48rpx;
    }
    .btn-more {
        height: 52rpx;
        line-height: 52rpx;
        border: 1rpx solid $uni-color-primary;
        margin-top: 64rpx;
        border-radius: 12rpx;
        padding: 0 12rpx;
        color: $uni-color-primary;
    }
}
.up-tag {
        font-size: 16rpx;
        border-radius: 6rpx;
        width: 64rpx;
        height: 24rpx;
        position: relative;
        top: -12rpx;
        background-color: $uni-color-primary;
        line-height: 24rpx;
        text-align: center;
        color: white;
        margin-left: 20rpx;
    }
</style>
